﻿@{
    ViewBag.Title = "问答列表";
    Layout = Url.Content("~/Views/Shared/_Layout.cshtml");
}

@section header{
    @Styles.Render("~/Content/element-ui/lib/theme-chalk/index.css")
}
<style>
    .highlight {
        background-color: yellow;
    }
</style>
<div class="page-header">
    <h1>
        @ViewBag.Title
        <small></small>
    </h1>
</div>
<div id="PAGE_MODEL">
    <div class="row" v-cloak>
        <!--查询开始-->
        <div class="form-group col-sm-12">
            <form class="form-inline" v-on:submit.prevent="getXhListindex()">
                <div class="form-group">
                    <label>查询方式：</label>
                    <label class="radio-inline">
                        <input type="radio" value="s" v-model="type">
                        序号
                    </label>
                    <label class="radio-inline">
                        <input type="radio" value="qa" checked v-model="type">
                        正文
                    </label>
                </div>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <label>
                        <input type="text" class="form-control" placeholder="输入一个关键字" id="keyword" v-model="keyword">
                    </label>
                    <button class="btn btn-primary" type="submit">
                        <i class="fa fa-fw fa-search"></i>
                        查询
                    </button>
                </div>
            </form>
        </div>
        <!--查询开始结束-->
        <!--分页开始-->
        <div class="col-md-12">
            <div class="block">
                <span class="demonstration"></span>
                <el-pagination @@size-change="handleSizeChange"
                               @@current-change="handleCurrentChange"
                               :current-page.sync="currentpage"
                               :page-sizes="pagesizes"
                               :page-size="pagesize"
                               layout="prev, pager, next, jumper,total, sizes"
                               :total="total">
                </el-pagination>
            </div>
        </div>
        <!--分页结束-->
        <!--表单开始-->
        <div class="col-md-12 table-responsive" id="pretime">

            <div class="list-group" v-for="(v,index) in VmXhs">
                <div class="list-group-item">
                    <p class="list-group-item-heading" style="color:#808080">
                        <b style="color:#606060; font-size:2em;">
                            {{v.sn}}
                            [问:]
                        </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span v-html="v.query"></span>
                    </p>
                    <br />
                    <p class="list-group-item-text" style="color:#606060"><strong v-html="v.answer"></strong></p>
                    <br />
                    <p class="list-group-item-text" style="color:#808080">{{moment(v.date).format('YYYY-MM-DD')}}</p>
                </div>
            </div>

        </div>
        <!--表单结束-->
        <!--分页开始-->
        <div class="col-md-12">
            <div class="block">
                <span class="demonstration"></span>
                <el-pagination @@size-change="handleSizeChange"
                               @@current-change="handleCurrentChange"
                               :current-page.sync="currentpage"
                               :page-sizes="pagesizes"
                               :page-size="pagesize"
                               layout="prev, pager, next, jumper,total, sizes"
                               :total="total">
                </el-pagination>
            </div>
        </div>
        <!--分页结束-->

    </div>
</div>

@section Script{
    <script src='@Url.Content("~/Content/libs/moment/moment.js")' type="text/javascript"></script>
    <script src='@Url.Content("~/Content/element-ui/lib/index.js")' type="text/javascript"></script>
    <script src='@Url.Content("~/Scripts/Qualification/xh.js")' type="text/javascript"></script>

    <script type="text/javascript">
    //链接地址定义
        var URLs = {
            URL_GET_XH: '@Url.Action("HttpClientDoGet", "Qualification")'         //获取列表
        }

        $(function () {
            vm.getXhListindex();
        });
    </script>
}
